Skip to content

feat(changefeed): add initial_scan to ydb_table_changefeed#62

Open
kprokopenko wants to merge 1 commit into
mainfrom
feature/ydb-table-changefeed-initial-scan
Open

feat(changefeed): add initial_scan to ydb_table_changefeed#62
kprokopenko wants to merge 1 commit into
mainfrom
feature/ydb-table-changefeed-initial-scan

Conversation

@kprokopenko

Copy link
Copy Markdown
Collaborator

Summary

Adds optional initial_scan to the ydb_table_changefeed resource so changefeeds can request an initial table snapshot at creation time, aligned with YDB CDC / ALTER TABLE changefeed.

Behaviour

  • initial_scan is optional, defaults to false, and is ForceNew (YDB only runs the initial scan when the changefeed is created).
  • When true, the provider emits INITIAL_SCAN = TRUE in the ADD CHANGEFEED ... WITH (...) scheme query.
  • DescribeTable does not expose this flag on the changefeed description; on read/refresh we persist the configured value from state to avoid spurious drift.

Tests

  • Unit tests for PrepareCreateRequest with initial_scan on/off.

Closes #52

Made with Cursor

Add optional initial_scan (default false, ForceNew) to match YDB CDC
ALTER TABLE ADD CHANGEFEED WITH (INITIAL_SCAN = TRUE).

DescribeTable does not return this flag; refresh keeps the configured
value in state to avoid spurious drift.

Fixes #52

Made-with: Cursor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Add initial_scan Support for YDB Changefeeds in Terraform Provider

1 participant